// API 列表配置文件
const apiList = {
  // 用户管理 API
  user: [
    {
      name: '获取用户列表',
      method: 'get',
      url: '/api/users',
      description: '获取系统用户列表，支持分页和筛选',
      params: [
        { name: 'page', type: 'number', description: '页码', defaultValue: 1 },
        { name: 'limit', type: 'number', description: '每页条数', defaultValue: 10 },
        { name: 'status', type: 'select', description: '用户状态', 
          options: [
            { label: '全部', value: '' },
            { label: '启用', value: 1 },
            { label: '禁用', value: 0 }
          ] 
        },
        { name: 'keyword', type: 'string', description: '搜索关键词' }
      ]
    },
    {
      name: '获取用户详情',
      method: 'get',
      url: '/api/users/:id',
      description: '根据用户ID获取用户详细信息',
      pathParams: [
        { name: 'id', type: 'number', description: '用户ID', required: true }
      ]
    },
    {
      name: '创建用户',
      method: 'post',
      url: '/api/users',
      description: '创建新用户',
      params: [
        { name: 'username', type: 'string', description: '用户名', required: true },
        { name: 'name', type: 'string', description: '姓名', required: true },
        { name: 'email', type: 'string', description: '邮箱' },
        { name: 'role', type: 'select', description: '角色',
          options: [
            { label: '管理员', value: 'admin' },
            { label: '普通用户', value: 'user' }
          ]
        },
        { name: 'status', type: 'select', description: '状态',
          options: [
            { label: '启用', value: 1 },
            { label: '禁用', value: 0 }
          ]
        }
      ]
    },
    {
      name: '更新用户',
      method: 'post',
      url: '/api/users/:id',
      description: '更新用户信息',
      pathParams: [
        { name: 'id', type: 'number', description: '用户ID', required: true }
      ],
      params: [
        { name: 'name', type: 'string', description: '姓名' },
        { name: 'email', type: 'string', description: '邮箱' },
        { name: 'role', type: 'select', description: '角色',
          options: [
            { label: '管理员', value: 'admin' },
            { label: '普通用户', value: 'user' }
          ]
        },
        { name: 'status', type: 'select', description: '状态',
          options: [
            { label: '启用', value: 1 },
            { label: '禁用', value: 0 }
          ]
        }
      ]
    },
    {
      name: '删除用户',
      method: 'post',
      url: '/api/users/:id/delete',
      description: '删除指定用户',
      pathParams: [
        { name: 'id', type: 'number', description: '用户ID', required: true }
      ]
    }
  ],
  
  // 商品管理 API
  product: [
    {
      name: '获取商品列表',
      method: 'get',
      url: '/api/products',
      description: '获取商品列表，支持分页和筛选',
      params: [
        { name: 'page', type: 'number', description: '页码', defaultValue: 1 },
        { name: 'limit', type: 'number', description: '每页条数', defaultValue: 10 },
        { name: 'category', type: 'string', description: '商品分类' },
        { name: 'status', type: 'select', description: '商品状态', 
          options: [
            { label: '全部', value: '' },
            { label: '上架', value: 1 },
            { label: '下架', value: 0 }
          ] 
        },
        { name: 'keyword', type: 'string', description: '搜索关键词' }
      ]
    },
    {
      name: '获取商品详情',
      method: 'get',
      url: '/api/products/:id',
      description: '根据商品ID获取商品详细信息',
      pathParams: [
        { name: 'id', type: 'number', description: '商品ID', required: true }
      ]
    },
    // 更多商品相关 API...
  ],
  
  // 订单管理 API
  order: [
    {
      name: '获取订单列表',
      method: 'get',
      url: '/api/orders',
      description: '获取订单列表，支持分页和筛选',
      params: [
        { name: 'page', type: 'number', description: '页码', defaultValue: 1 },
        { name: 'limit', type: 'number', description: '每页条数', defaultValue: 10 },
        { name: 'status', type: 'select', description: '订单状态', 
          options: [
            { label: '全部', value: '' },
            { label: '待付款', value: 0 },
            { label: '待发货', value: 1 },
            { label: '已发货', value: 2 },
            { label: '已完成', value: 3 },
            { label: '已取消', value: 4 }
          ] 
        }
      ]
    },
    // 更多订单相关 API...
  ],
  
  // 统计分析 API
  stats: [
    {
      name: '获取仪表盘数据',
      method: 'get',
      url: '/api/stats/dashboard',
      description: '获取系统仪表盘数据'
    },
    // 更多统计相关 API...
  ],
  
  // 系统设置 API
  system: [
    {
      name: '获取系统配置',
      method: 'get',
      url: '/api/system/config',
      description: '获取系统配置信息'
    },
    // 更多系统相关 API...
  ]
};

export default apiList; 